<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="thx" uri="/thx-tags"%>
<style>
.form-horizontal .form-group {
	margin-right: 0px;
	margin-left: 0px;
}
</style>

<form id="user-form" name="ui-adminlte-form" class="form-horizontal"
	data-toggle="validator" role="form" method="post"
	container = ".content-wrapper"
	action="${pageContext.request.contextPath}/information/column!save.action"
	forward-action="${pageContext.request.contextPath}/information/column!list.action">
	<s:token></s:token>
	<input name="id" value="${entity.columnId}" type="hidden"/>
	<input name="message" value="${message}" type="hidden"/>
	<input type="hidden" name='entity.columnId' value="${entity.columnId}">

	<div id="commons">
		<div class="row">
			<div class="form-group col-sm-12">
				<label>栏目名称 </label>
					<input type="text" name="entity.columnName" value="${entity.columnName}" class="form-control required"
						placeholder="请输入栏目名称"/>
			</div>
			<div class="form-group col-sm-12 required">
                <div>
 					<label>是否公开</label>
                    <input type="radio" name="entity.isPublic" value="1" <c:if test="${empty entity.isPublic}">checked</c:if> <c:if test="${entity.isPublic=='1'}">checked</c:if>/>是
                    <input type="radio" name="entity.isPublic" value="0" <c:if test="${entity.isPublic=='0'}">checked</c:if>/>否
                </div>
            </div>			
			<div class="form-group col-sm-12">
				<label>描述 </label>
					<input type="text" name="entity.columnDesc" value="${entity.columnDesc}" class="form-control required"
						placeholder="请输入栏目名称"/>
			</div>
		</div>
	</div>
</form>

<script>
require(['jquery','form' ], function($,form) {
	form.init();
	//var message='${message}';
	//var userId ='${entity.columnId}';
/* 	$("input:radio[name=selectIsPublic]").change(function () {
		var selecVal = $('input[type="radio"][name="selectIsPublic"]:checked').val();
		$("input[name='entity.isPublic']").val(selecVal);
    }); */
});
</script>

